//#define __FORCE_TRACE__
//#define __FORCE_DEBUG__
//#define __FORCE_INFO__
#define THIS_FILE "tyr_airdrop\fn_updateCombo.sqf"
#include <core_macros.h>

TRACE_1("Start",_this);
TMFPROFILERSTART;

private ["_selection"];
DEFAULT_PARAM(_selection,0,0);

lbclear 1152;
_counter = 0;
switch (_selection) do {
	case 0: {
		lbAdd [1152, localize "STR_TYR_DROP_AMMO"];
		lbSetData [1152,_counter,0];
		INC(_counter);
	};
	case 1: {
		{
			_name = _x;
			_name = [_x,0] call mso_fnc_getDisplayName;
			if (_name == "") then { _name = _x; };
			lbAdd [1152,_name];
			lbSetData [1152,_counter,_x];
			INC(_counter);
		} foreach GVAR(VEHICLE_LIST);
		lbSetCurSel [1152, 0];
	};
	case 2: {
		{
			_name = _x;
			_name = [_x,0] call mso_fnc_getDisplayName;
			if (_name == "") then { _name = _x; };
			lbAdd [1152,_name];
			lbSetData [1152,_counter,_x];
			INC(_counter);
		} foreach GVAR(STATIC_LIST);
		lbSetCurSel [1152, 0];
	};
};
if (_counter > 0) then {
	lbSetCurSel [1152,0];
};
TRACE("End");
TMFPROFILERSTOP;
